// DlgPref.h: interface for the CDlgPref class.
//
//////////////////////////////////////////////////////////////////////

#pragma once


#include "Draw.h"
#include "Alarm.h"
class CDlgPref  
{
public:
	CDlgPref(const CDraw* pdr,const CAlarm* pal);
	virtual ~CDlgPref();
private:
  HWND m_hWnd;
  int m_nTic;
public:
  CDraw m_dr;
  CAlarm m_al;
  static COLORREF m_arc[16];
  UINT  DoModal(HWND hWndParent);
  int m_w;
private:
  static LRESULT CALLBACK _DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  LRESULT CALLBACK DlgProc(UINT message, WPARAM wParam, LPARAM lParam);
  void OnCommand(int wmId,int wmEvent);
  void OnCreate();
  void OnDestroy();
  void OnOk();
  void OnButtonBKG();
  void OnButtonFOR();
  void ChangePosition(EPosition newPos);
  void OnTimer(long id);
  void OnChangeWidth();
  bool GetPage();
  void InitPage();
  void OnBrowse(UINT idCmbo,UINT idFilter);
  void OnBTest();


	void OnChMess();
	void OnChSound();
	void OnChStart();
	void OnBrowseSound();
	void OnBrowseStart();

};
inline void CDlgPref::OnDestroy()
{
  KillTimer(m_hWnd,100);
}
inline void CDlgPref::OnBrowseSound()
{
	OnBrowse(IDC_CM_SOUND,IDS_FILTER_SOUND);
}
inline void CDlgPref::OnBrowseStart()
{
	OnBrowse(IDC_CM_START,IDS_FILTER_EXE);

}


